{{define "content"}}
    <div id="main">
        <!-- 公告 -->
        <div id="notice" class="list">
            <ul>
                <!--{* foreach from=$aInform  key = key item=item *}-->
                <li><em class="red b">[公告]</em> 
                    <a href="#">Golang+Mongodb开发的论坛上线了！ 官方讨论QQ群81746847</a>
                    <span>[2013.03.09]</span>
                </li>
                <!--{*/foreach*}-->
            </ul>
        </div>
        <!-- 热门标签 -->
        <!--
        <div id="hottags" class="box list">
            <h4 class="sky-blue"><strong>热门标签</strong></h4>
            <p class="sky-blue">
                <a href="#"></a>
            </p>
        </div>
        -->
        <!-- 论坛版块列表 -->
        <div id="content">
            {{range .ForumTop}}
			{{if les .Fup 1}}
                {{if neq .Fid 1}}
					</table>
				</div>
			</div>
                {{end}}
			{{end}}
			{{if .Fup }}
                        <!--分类-->
                        <tbody onmouseover="hover(this);" onmouseout="out(this);">
                            <tr>
                                <td class="icon">
                                    {{if gre .Todayposts 0 }}
                                        <img src="/images/forumnew.gif" />
                                    {{else}}
                                        <img src="/images/forum.gif" />
                                    {{end}}
                                </td>
                                <th class="section">
                                    <div class="left">
                                        <h2 class="subject">
                                            <a href="/forum/{{.Fid}}">{{.Name}}</a>
                                            <em class="gray">(今日: {{if gre .Todayposts 0 }} <span class="red">{{.Todayposts}}</span>{{else}}0{{end}})</em>
                                        </h2>
                                        <p>{{.Description}}</p>                                        
                                    </div>
                                </th>
                                <td class="nums"><span><em>{{.Topics}}</em>/{{.Posts}}</span></td>
                                <td class="lastpost">
								    {{if neq .Lastpost.userid ""}}
                                    <p><A HREF="/t/{{.Lastpost.tid}}">{{.Lastpost.subject}}</A></p>
                                    <A HREF="/user/{{.Lastpost.userid}}">{{.Lastpost.username}}</A>
                                    <span class="time">{{TplTime .Lastpost.time ""}} </span>
									{{else}}
                                     无
									{{end}}
                                </td>
                                <td class="banzhu">
                                  <!--{* foreach from=$item->moderatorarr  key = key2 item=item2 *}-->
                                   <a href="user.php?uid=<!--{*$key2*}-->"><!--{*$item2*}--></a><br/>
								  <!--{*foreachelse*}-->
								-
								  <!--{*/foreach*}-->
                                </td>
                            </tr>
                        </tbody>

						{{else}}
                        <!--板块-->
                        <div class="list">               
                            <h3 class="block_sub">                    
                                <span class="closeicon right"><span id="cat{{.Fid}}"></span><img onclick="cat_toggle(this, 'cat_id{{.Fid}}')" src="/images/cate_fold.gif" /></span>
                                <em class="right supmod">[总版主:                                   
                                <!--{* foreach from=$item->moderatorarr  key = key2 item=item2 *}-->
                                   <a href="user.php?uid=<!--{*$key2*}-->"><!--{*$item2*}--></a>
                                <!--{*/foreach*}-->]
                                </em>
                                {{.Name}}
                            </h3>
                            <div id="cat_id{{.Fid}}" class="mainbox">
                                <table>
                                    <thead>
                                        <tr>
                                            <td class="icon">&nbsp;</td>
                                            <th class="section">版块</th>
                                            <td class="nums">主题/帖数</td>
                                            <td class="lastpost">最后发表</td>
                                            <td class="banzhu">版主</td>
                                        </tr>
                                    </thead>
                       {{end}}
					{{end}}
                    </table>
                </div>
            </div>

        </div>
        <!-- 在线 -->
        <div id="online" class="box list">
            
            <h4>
                <span class="closeicon right"><img onclick="cat_toggle(this, 'userlist')" src="/images/cate_fold.gif" /></span>
                <strong>在线会员</strong>  - {{.OnlineNum}} 人在线 - {{.OnlineGuest}} 位游客
            </h4>
            <dl id="onlinelist">
                <dt>
                    <img src="/images/group/1.gif" />
                    管理员&nbsp;&nbsp;&nbsp;&nbsp;
                    <img src="/images/group/2.gif" />
                    版主&nbsp;&nbsp;&nbsp;&nbsp;
                    <img src="/images/group/3.gif" />
                    嘉宾&nbsp;&nbsp;&nbsp;&nbsp;
                    <img src="/images/group/4.gif" />
                    会员
                </dt>
                <dd id="userlist">
                    <ul class="userlist">
                    {{range .OnlineTop}}
                        {{if eq .Hidden '0'}}
						<li class="user_3">隐身</li>
                        {{else}}
							{{if eq .Groupid '1'}}
								<li class="user_1"><a href="/user/{{.Userid}}">{{.Username}}</a></li>
	                        {{else}}
								{{if eq .Groupid '2'}}
									<li class="user_2"><a href="/user/{{.Userid}}">{{.Username}}</a></li>
		                        {{else}}
                                    {{if eq .Username ""}}
									    <!--<li class="user_3">访客</li>-->
                                    {{else}}
									    <li class="user_3"><a href="/user/{{.Userid}}">{{.Username}}</a></li>
                                    {{end}}
		                        {{end}}
	                        {{end}}

                        {{end}}
                    {{end}}
                    </ul>
                </dd>
            </dl>
        </div>
        <!-- 版块分类 -->
        <div class="legend list">
            <label><img src="/images/forum.gif" />普通版块</label>
            <label><img src="/images/forumnew.gif" />新帖版块</label>
            <label><img src="/images/forumlock.gif" />加密版块</label>
            <label><img src="/images/forumgood.gif" />只读版块</label>
        </div>
    </div>
{{end}}
